﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Reflection;

namespace SearchFileIformation
{
    public class ApiObject
    {
        public string api { get; set; }
        public string method { get; set; }
        public string description { get; set; }
        public string returntype { get; set; }
        public string param { get; set; }
        public string controller { get; set; }
        public string maxDelayTime { get; set; }
        public string minDelayTime { get; set; }
        public string averageDelayTime { get; set; }
        public Dictionary<string,int> GetApiIndex()
        {
            Dictionary<string, int> ret = new Dictionary<string, int>();
            ApiObject apiObject = new ApiObject();
            Type apiType = apiObject.GetType();
            PropertyInfo[] property = apiType.GetProperties();
            int i = 1;
            foreach(PropertyInfo item in property)
            {
                ret.Add(item.Name, i);
                i++;
            }
            return ret;
        }

    }
}
